// const mapanalyse = (obj) => {
//     const arr = obj.features
//     arr[0].geometry.coordinates.map(ele => {
//         console.log(ele)
//     })
// }



// 负责处理地理信息 函数
/**
 * 
 * @param {传入地理信息json} ob
 *  
 */
const mapanalyse = (ob) => {
    let darr = ob.features
    let arr = []
    darr.forEach(ele => {
        arr.push(ele.properties.name)
            // console.log(ele.geometry.coordinates[0])
        ele.geometry.coordinates[0] = mapany(ele.geometry.coordinates[0])
    })
    if (!darr.namelist) darr.namelist = arr

    return darr
}



const mapany = (bj) => {
    let arr = []
    bj.forEach(ele => {
        let obj = {}
        obj["longitude"] = ele[0]
        obj["latitude"] = ele[1]
        console.log(obj, ele)
        arr.push(obj)
    })

    return arr
}

export {
    // mapanalyse
    mapanalyse
}